# -*- coding: utf-8 -*-
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_bootstrap import Bootstrap
from sqlalchemy import create_engine
from config import SQLALCHEMY_DATABASE_URI

app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)
bootstrap = Bootstrap(app)
lm = LoginManager()
lm.setup_app(app)
lm.login_view = 'login'
lm.login_message = '请先登录再查看本页面。'
lm.session_protection = 'strong'

from app import views
from app import models

db.create_all()

